<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>值的绑定</title>
</head>
<body>
    <script src="/js/vue.js"></script>
    <div id ="app">

       <label :for="item" v-for="item in hobbies">
            <input type="checkbox" :id="item" :value="item" v-model="myHobbies">{{item}}
       </label>
       <p>你选择的时{{myHobbies}}</p>
    </div>
    <br>
    <script>
       let app =new Vue({
         el:"#app",
         data:{
           hobbies:['篮球','足球','羽毛球','乒乓球','台球','唱','跳'],
            myHobbies:[]
        }
       })
    </script>  
</body>
</html>